<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('村统计信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>null：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>精准确村确户总户数：</label>
                                <input type="text" name="population"/>
                            </li>
                            <li>
                                <label>常住人口数量：</label>
                                <input type="text" name="residents"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="jjm:village:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="jjm:village:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="jjm:village:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="jjm:village:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('jjm:village:edit')}]];
        var removeFlag = [[${@permission.hasPermi('jjm:village:remove')}]];
        var prefix = ctx + "jjm/village";

        $(function() {
            var options = {
                url : prefix + "/list",
                updateUrl: prefix + "/edit",
                modalName: [[${dept.deptName}]]+"居民户籍信息",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                columns:[
                    [{
                        field: 'villageId',
                        title: '编号',
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'name',
                        title: '村',
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'population',
                        title: titleValue('精准确村<br>确户总户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'residents',
                        title: titleValue('常住人<br>口户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'jjm',
                        title: titleValue('洁净取<br>暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'notjjm',
                        title: titleValue('洁净煤<br>未入户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'others',
                        title: titleValue('采用其他方<br>式取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: 'buqu',
                        title: titleValue('冬季不<br>取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    },{
                        field: 'swz',
                        title: titleValue('生物质<br>取暖户数'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    }, {
                        field: '',
                        title: '村',
                        align: 'center',
                        colspan : 2,
                        valign: "middle"
                    },{
                        field: 'orderAmount',
                        title: titleValue('总购洁<br>净煤数(吨)'),
                        rowspan : 2,
                        align: "center",
                        valign: "middle"
                    },{
                        title: '操作',
                        align: 'center',
                        rowspan : 2,
                        valign: "middle",
                        formatter: function(value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.modal.openTab(\''+row.name+'辖区内信息\',\'/jjm/village/village\')"><i class="fa fa-edit"></i>查看详情</a> ');
                            return actions.join('');
                        }
                    }],[
                        {
                            field: 'baolianrenCount',
                            title: titleValue('村级包<br>联人数'),
                            rowspan : 1,
                            align: "center",
                            valign: "middle"
                        }, {
                            field: 'baolianhuCount',
                            title: titleValue('包联<br>户数'),
                            width: 80,
                            valign: "middle"
                        }
                    ]]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>